import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

class Teacher implements Comparator<Teacher> {
 String name;
 String password;
 String id;


 public   synchronized static void fun1(){
     System.out.println("11");
 }

    @Override
    public int compare(Teacher o1, Teacher o2) {
        return 0;
    }
}
public class Test2 {

    public static void main(String[] args) {
        HashMap<String,String> hashMap = new HashMap<>();
        Set<Integer> set = new HashSet<>();
    }
      public static boolean flag = true;
    public static void main2(String[] args) throws InterruptedException {


        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                while (flag){
                    System.out.println("good boy");
                }
            }
        }

        );

    thread.start();
         Thread thread1 = new Thread(new Runnable() {
             @Override
             public void run() {
                 try {
                     Thread.sleep(1000);
                 } catch (InterruptedException e) {
                     throw new RuntimeException(e);
                 }
                 System.out.println("将falg设置为false");
                 flag = false;
             }
         });
           thread1.start();
    }
    public static void main1(String[] args){

        Thread thread = new Thread(()->{
            System.out.println("adc");
        });
        thread.start();
          Thread thread1 = new Thread(){
              @Override
              public void run() {
                  System.out.println("111");
              }
          };
          Thread thread2 = new Thread(new Runnable() {
              @Override
              public void run() {
                  System.out.println();
              }
          });

          ExecutorService executorService = Executors.newFixedThreadPool(10);
          executorService.submit(new Runnable() {
              @Override
              public void run() {
                  for(int i = 0; i<1000;i++){
                      System.out.println("aada");
                  }
              }
          });

    }


}
